import type { FormRules } from 'element-plus'

// 样例表单
export interface AddForm {
  loginId: string
  realName: string
  password: string
}

// 重置密码表单（默认值）
export const defaultAddForm: AddForm = {
  loginId: '',
  realName: '',
  password: '',
}

// 重置密码表单（验证规则）
export const addFormRule: FormRules<AddForm> = {
  loginId: [
    { required: true, message: '用户名不可为空！', trigger: 'blur' }
  ],
  realName: [
    { required: true, message: '真实姓名不可为空！', trigger: 'blur' },
  ],
  password: [
    { required: true, message: '确认密码不可为空！', trigger: 'blur' },
    { min: 6, max: 20, message: '确认密码长度6~20的字符！', trigger: 'blur' },
  ],
}
